﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HeathCareSystem
{
    public class TaiKhoanDAO
    {
        DataProvider dp = new DataProvider();

        public bool ThemTaiKhoanMoi(TaiKhoanDTO taiKhoan)
        {
            string strSQL = string.Format("INSERT INTO TaiKhoan (TenDangNhap, MatKhau, MaLoaiTaiKhoan)" +
                                          "VALUES (N'{0}', N'{1}', '{2}')",
                                            taiKhoan.tenDangNhap, taiKhoan.matKhau, taiKhoan.maLoaiTaiKhoan);
            return dp.ExecuteNonQuery(strSQL);
        }
    }
}